import 'package:taonile/generated/json/base/json_field.dart';
import 'package:taonile/generated/json/pay_methods_entity.g.dart';
import 'dart:convert';

@JsonSerializable()
class PayMethodsEntity {
  late int code = 0;
  late String msg;
  late List<PayMethodsData> data = [];

  PayMethodsEntity();

  factory PayMethodsEntity.fromJson(Map<String, dynamic> json) => $PayMethodsEntityFromJson(json);

  Map<String, dynamic> toJson() => $PayMethodsEntityToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}

@JsonSerializable()
class PayMethodsData {
  @JSONField(name: "pay_name")
  late String payName;
  @JSONField(name: "pay_channel")
  late String payChannel;
  late String icon;
  late String pay;

  PayMethodsData();

  factory PayMethodsData.fromJson(Map<String, dynamic> json) => $PayMethodsDataFromJson(json);

  Map<String, dynamic> toJson() => $PayMethodsDataToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}
